<?php 
	require '../utils/conn.php';
	$type = $_REQUEST['type'];
	
	$query = "SELECT message,timestamp,type FROM t_message";
	$result = mysql_query($query);
	$arr = array();
	while($row = mysql_fetch_array($result,MYSQL_ASSOC)){   
		$arr[] = $row;                                  
	}
	$str = json_encode($arr); 
	echo $str;                         
?>